import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/HomeView.vue";
import Login from "../views/Login.vue";
// 模块1：空域需求管理模块
import Module1AirspaceNeed from "@/views/Module1AirspaceNeed.vue";
import Module1AirspaceRestriction from "@/views/Module1AirspaceRestriction.vue";

// 模块2：空域规划方案处理模块
import Module2ApprovalRecord from "@/views/Module2ApprovalRecord.vue";
import Module2PlanningScheme from "@/views/Module2PlanningScheme.vue";
import Module2PlanningRelease from "@/views/Module2PlanningRelease.vue";

// 模块3：空域规划发布模块
import Module3UsageConditions from "@/views/Module3UsageConditions.vue";

// 模块4：空域容量评估模块
import Module4SafetyInterval from "@/views/Module4SafetyInterval.vue";
import Module4CapacityAssessment from "@/views/Module4CapacityAssessment.vue";

// 模块5：空域占用情况评估与告警模块
import Module5FlowAssessment from "@/views/Module5FlowAssessment.vue";
import Module5AlertResults from "@/views/Module5AlertResults.vue";

// 模块6：空域运行管理页面
import Module6AirspaceManage from "@/views/Module6AirspaceManage.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/login",
    name: "Login",
    component: Login,
  },
  // 模块1：空域需求管理模块
  {
    path: "/airspace-need",
    name: "Module1AirspaceNeed",
    component: Module1AirspaceNeed,
  },
  {
    path: "/airspace-restriction",
    name: "Module1AirspaceRestriction",
    component: Module1AirspaceRestriction,
  },

  // 模块2：空域规划方案处理模块
  {
    path: "/approval-record",
    name: "Module2ApprovalRecord",
    component: Module2ApprovalRecord,
  },
  {
    path: "/planning-scheme",
    name: "Module2PlanningScheme",
    component: Module2PlanningScheme,
  },
  {
    path: "/planning-release",
    name: "Module2PlanningRelease",
    component: Module2PlanningRelease,
  },

  // 模块3：空域规划发布模块
  {
    path: "/usage-conditions",
    name: "Module3UsageConditions",
    component: Module3UsageConditions,
  },

  // 模块4：空域容量评估模块
  {
    path: "/safety-interval",
    name: "Module4SafetyInterval",
    component: Module4SafetyInterval,
  },
  {
    path: "/capacity-assessment",
    name: "Module4CapacityAssessment",
    component: Module4CapacityAssessment,
  },

  // 模块5：空域占用情况评估与告警模块
  {
    path: "/flow-assessment",
    name: "Module5FlowAssessment",
    component: Module5FlowAssessment,
  },
  {
    path: "/alert-results",
    name: "Module5AlertResults",
    component: Module5AlertResults,
  },
  
  // 模块6：空域运行管理页面
  {
    path: "/airspace-manage",
    name: "Module6AirspaceManage",
    component: Module6AirspaceManage,
  }
];

const router = new VueRouter({
  mode: "history", // 使用 history 模式（没有 # 符号）
  base: process.env.BASE_URL,
  routes,
});

export default router;
